import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import  path  from 'path'
// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  //-------配置代理--------//
  server: {
    port: 8002,    //配置端口
    host: '0.0.0.0',
    open: true,
    proxy:{
      '/api':'https://api.imooc.zcwytd.com'
    },
    cors: true
  },
  //---------------//
  resolve: {
    alias:{
      '@': path.resolve(__dirname, './src')
    }
  }
})
